class Box extends egret.Shape {
    private w:number = 0
    private h:number = 0
    private color:number = 0
    public vx:number = 0
    public vy:number = 0
    public constructor(width:number=50, height:number=50, color:number=0xFF0000) {
        super()
        this.w = width
        this.h = height
        this.color = color
        this.init()
    }

    public init() {
        this.graphics.beginFill(this.color)
        this.graphics.drawRect(-this.w / 2, -this.h / 2, this.w, this.h)
        this.graphics.endFill()
    }
}